# 添加打开文件夹的函数
def open_data_folder():
    """Open data folder in file explorer"""
    try:
        import os, platform, subprocess
        data_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), "data")
        if platform.system() == 'Windows':
            os.startfile(data_dir)
        elif platform.system() == 'Darwin':  # macOS
            subprocess.run(['open', data_dir])
        else:  # linux
            subprocess.run(['xdg-open', data_dir])
    except Exception as e:
        from loguru import logger
        logger.error(f"Failed to open data folder: {str(e)}")

# 在设置界面添加按钮
def create_settings_window(root):
    # ... (previous code)
    
    # 添加打开data目录的按钮
    open_data_btn = ttk.Button(
        frame,
        text="打开提示词目录",
        command=open_data_folder
    )
    open_data_btn.pack(pady=5)
    
    # ... (rest of the code) 